package common.database;


public class Common {

	public static String createSQLForInstallTable( DAO_Obj obj) {
		String result = "CREATE TABLE " + obj.getTableName() + "( "
				+ obj.getColumnId() + " PRIMARY KEY AUTOINCREMENT";
		String[][] columns = obj.getColumns();
		for( int i=0; i< columns.length; i++) {
			result += ", " + columns[i][0] + " " + columns[i][1];
		}
		return result + " );";
	}
	public static String createSQLForRemoveTable( DAO_Obj obj) {
		return "DROP TABLE IF EXISTS " + obj.getTableName() +";";
	}
}
